<template id="temp">
  <!-- vue实例外创建 -->
  <div>
    <el-rate v-model="value1" show-text @change="sonmethod"> </el-rate>
  </div>
</template>
<!-- 调用   <mycom></mycom> -->
<script>
export default {

  data() {
    return {
      value1: this.rate,
    }
  },

  mounted() {

  },

  methods: {
    sonmethod() {
      this.$emit("callfather", this.value1);
    }

  },
  props: ["rate"],
  watch: {
    rate: function (newVal, oldVal) {
      this.value1 = newVal;
    }
  },
};
</script>